package com.qianxun.spider.http;

import com.qianxun.spider.enums.HttpMethod;

/**
 * @author: huwei
 * @date: 2020/6/30 10:14
 * @version: 1.0.0
 */
public class AbstractHttpRequest implements HttpRequest {
    protected HttpMethod method;
    protected String url;

    public AbstractHttpRequest(HttpMethod method, String url) {
        this.method = method;
        this.url = url;
    }

    @Override
    public HttpMethod method() {
        return this.method;
    }

    @Override
    public String url() {
        return this.url;
    }

    @Override
    public String toString() {
        return "AbstractHttpRequest{" +
                "method=" + method +
                ", url='" + url + '\'' +
                '}';
    }
}
